package com.ianmoone.JZOF;

import java.util.Scanner;

public class S360Test1 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		in.nextLine();
		int aMax = Integer.MIN_VALUE;
		int aMin = Integer.MAX_VALUE;
		int bMax = Integer.MIN_VALUE;
		int bMin = Integer.MAX_VALUE;
		int max = Integer.MIN_VALUE;
		for (int i = 0; i < n; i++) {
			String string = in.nextLine();
			String[] split = string.split(" ");
			int k = Integer.valueOf(split[0]);
			int j = Integer.valueOf(split[1]);
			aMax = aMax>k?aMax:k;
			aMin = aMin<k?aMin:k;
			bMax = bMax>j?bMax:j;
			bMin = bMin<j?bMin:j;
		}
		max = (aMax-aMin)>(bMax-bMin)?(aMax-aMin):(bMax-bMin);
		System.out.println(max*max);
	}
}
